import data_processing
import spatial_autocorrelation

if __name__ == '__main__':
    geodata_path = 'C:/Users/18295335197/Desktop/test/湖北省区县级疫情统计.geojson'
    #geodata_path = 'C:/Users/18295335197/Desktop/test/湖北省乡镇街道级疫情统计.geojson'
    gdf = data_processing.read_geodata(geodata_path)
    w=spatial_autocorrelation.s_weights(gdf, w_type='Rook')
    #ylag=spatial_autocorrelation.Spatial_lay(gdf, w)
    i1=spatial_autocorrelation.Global_Spatial_Autocorrelation(gdf, w)
    print('Global_Spatial_Autocorrelation',i1)
    i2=spatial_autocorrelation.Local_Spatial_Autocorrelation(gdf, w)
    print('Local_Spatial_Autocorrelation',i2)